﻿using FluentNHibernate.Mapping;
using TimeTracker.Core.Domain.Entities;

namespace TimeTracker.Core.Domain.Mappings
{
    public class UnosVremenaSatiMappings : ClassMap<UnosVremenaSati>
    {
        public UnosVremenaSatiMappings()
        {
            Table("UnosVremenaSati");

            Id(x => x.UnosVremenaSatiId).GeneratedBy.Identity();
            Map(x => x.BrojSati);
            Map(x => x.TipSata);

            References(x => x.UnosVremena)
                .ForeignKey("Id")
                .Column("UnosVremenaId");
        }
    }
}
